package org.glut.backend.controller;

import lombok.extern.slf4j.Slf4j;
import org.glut.backend.domain.SoldSeat;
import org.glut.backend.service.ISoldSeatService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

import java.util.List;

/**
 * 已售座位表 前端控制器
 *
 * @author gluglu2
 * @since 2025-08-01 17:43
 */
@RestController
@RequestMapping("/api/sold-seat")
@Slf4j
public class SoldSeatController {
    
    @Autowired
    private ISoldSeatService soldSeatService;

    /**
     * 根据ID查询
     */
    @GetMapping("/getScheduling/{schedulingId}")
    public ResponseEntity<List<SoldSeat>> getScheduling(@PathVariable Integer schedulingId) {
        List<SoldSeat> soldSeats = soldSeatService.getScheduling(schedulingId);
        return ResponseEntity.ok().body(soldSeats);
    }

}